import request from '@/utils/request'

// 查询知识库列表
export function listKnowledgeStore(query) {
  return request({
    url: '/vanger/knowledgeStore/list',
    method: 'get',
    params: query
  })
}

// 查询知识库列表（联合）
export function listUnion(query) {
  return request({
    url: '/vanger/knowledgeStore/listUnion',
    method: 'get',
    params: query
  })
}


// 查询知识库详细（联合）
export function getInfoUnion(id) {
  return request({
    url: '/vanger/knowledgeStore/getInfoUnion/' + id,
    method: 'get'
  })
}

// 查询知识库详细
export function getKnowledgeStore(id) {
  return request({
    url: '/vanger/knowledgeStore/' + id,
    method: 'get'
  })
}

// 新增知识库
export function addKnowledgeStore(data) {
  return request({
    url: '/vanger/knowledgeStore',
    method: 'post',
    data: data
  })
}

// 修改知识库
export function updateKnowledgeStore(data) {
  return request({
    url: '/vanger/knowledgeStore',
    method: 'put',
    data: data
  })
}

// 删除知识库
export function delKnowledgeStore(id) {
  return request({
    url: '/vanger/knowledgeStore/' + id,
    method: 'delete'
  })
}
